from bs4 import BeautifulSoup
import urllib.request

def readtext(url,coding='default'):
    html=urllib.request.urlopen(url)
    page=html.read().decode(self.coding)
    soup = BeautifulSoup(page, "html.parser")
    #text=''
    for content in soup.find_all('div'):
        if content.get('class')=='content' and content.get('id')=='booktext':
            ext=conteng.get_text()
            #print(text)
    return text


url='http://www.biquge0.com/zread/7/7066/4100874.html'
coding='gbk'
html=urllib.request.urlopen(url)
page=html.read().decode(coding)
soup = BeautifulSoup(page, "html.parser")
#text=''
for content in soup.find_all('div'):
    if content.get('class')=='content' and content.get('id')=='booktext':
        text=conteng.get_text()

#print(soup.div)

div_list=soup.find_all('div',class_='content')


